<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAkbusBusIsCheckTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_bus_is_check', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->date('month')->nullable()->comment('月份');
            $table->integer('is_check')->nullable()->comment('是否纳入审核');
            $table->unsignedBigInteger('bus_id')->comment('车辆ID');
            $table->foreign('bus_id')->references('id')->on('akbus_bus')->onDelete('cascade');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_bus_is_check');
    }
}
